package com.example.desensitization.domain;

import com.example.desensitization.annotation.Desensitization;
import com.example.desensitization.constant.DesensitizationEnum;
import lombok.Builder;
import lombok.Data;

@Data
@Builder
public class User {

    /**
     * 主键
     */
    private String id;

    /**
     * 用户名
     */
    private String name;

    /**
     * 身份证号码
     */
    @Desensitization(type = DesensitizationEnum.ID_CARD_NO)
    private String idCardNo;

    /**
     * 电话号码
     */
    @Desensitization(type = DesensitizationEnum.PHONE)
    private String phone;

    /**
     * 地址
     */
    @Desensitization(type = DesensitizationEnum.CUSTOM_RULE,start = 2,end = 5)
    private String address;

    /**
     * 银行卡号
     */
    @Desensitization(type = DesensitizationEnum.BANK_CARD_NO)
    private String bankCardNo;

}
